{if $list}
<script type="text/javascript">
	$(document).ready(function(){
		$("#data_page").find("a").bind("click",function(){
			var ajax_url = $(this).attr("href");		
			$.ajax({ 
				url: ajax_url,
				type: "POST",
				cache:false,		
				success:function(result){
					$(".detail_cnt").find("#extra_info").html(result);
				},
				error:function(o){
					//alert(o.responseText);
				}
			});
			return false;
		});
	});
</script>
{if $type eq "t"}
<div class="aj_content">
	{foreach from=$list key=key item=ditem name=ditem}
	<div class="aj_item clearfix">
		<a href="{$ditem.url}" title="{$ditem.name}" class="f_l" target="_blank"><img src="{function name="get_spec_image" v=$ditem.image w=142 h=116 g=1}"  alt="{$ditem.name}"/></a>
		<div class="aj_inner f_l">
			<a href="{$ditem.url}" class="aj_name" title="{$ditem.name}" target="_blank">{function name="msubstr" v=$ditem.name b=0 e=80}</a>
			<dl class="clearfix">
				<dd>原价：{$ditem.format_origin_price}元现金券</dd>
				<dd>现仅售：<strong class="red">{$ditem.format_current_price}</strong></dd>
				<dd>折扣：<strong class="red">{$ditem.discount}</strong></>折</dd>
			</dl>
			<div class="clearfix"><a class="aj_button f_l" href="{$ditem.url}" target="_blank"></a><span class="d_buy f_l">已售：{$ditem.buy_count}张</span></div>
		</div>
	</div>
	{if !$smarty.foreach.ditem.last}
	<i class="aj_border"></i>
	{/if}	
	{/foreach}
</div>
{/if}
{if $type eq "y"}
<div class="aj_content">
	{foreach from=$list key=key item=ditem name=ditem}
	<div class="aj_item clearfix">
		<a href="{$ditem.url}" title="{$ditem.name}" class="f_l" target="_blank"><img src="{function name="get_spec_image" v=$ditem.image w=142 h=116 g=1}"  alt="{$ditem.name}"/></a>
		<div class="aj_inner f_l">
			<a href="{$ditem.url}" class="aj_name" title="{$ditem.name}" target="_blank">{function name="msubstr" v=$ditem.name b=0 e=38}</a>
			<p class="p_lh">优惠简价：<span>{function name="msubstr" v="$ditem.list_brief" a=0 b=38px}</span></p>
			<p class="p_lh">
				{if $ditem_item.end_time eq 0}
					{$LANG.NO_END_TIME}
				{else}
					{$LANG.END_TIME}：<span>{function name="to_date" v=$ditem_item.end_time f="Y-m-d"}</span>
				{/if}
			</p>
			<div class="clearfix" style="margin-top:13px;"><a class="aj_button f_l" href="{$ditem.url}" target="_blank"></a><span class="d_buy f_l">{$ditem.view_count}人已查看</span></div>
		</div>
	</div>
	{if !$smarty.foreach.ditem.last}
	<i class="aj_border"></i>
	{/if}	
	{/foreach}
</div>
{/if}
{if $type eq "d"}
<div class="aj_content">
	{foreach from=$list key=key item=ditem name=ditem}
	<div class="aj_item clearfix">
		<a href="{$ditem.url}" title="{$ditem.name}" class="f_l" target="_blank"><img src="{function name="get_spec_image" v=$ditem.image w=142 h=116 g=1}"  alt="{$ditem.name}"/></a>
		<div class="aj_inner f_l">
			<a href="{$ditem.url}" class="aj_name" title="{$ditem.name}" target="_blank">{function name="msubstr" v=$ditem.name b=0 e=38}</a>
			<dl class="clearfix xj_dl">
				<dd>原价：{$ditem.format_origin_price}元现金券</dd>
				<dd>现仅售：<strong class="red">{$ditem.format_current_price}</strong></dd>
				<dd>折扣：<strong class="red">{$ditem.discount}</strong></>折</dd>
			</dl>
			<div class="clearfix"><a class="aj_button f_l" href="{$ditem.url}" target="_blank"></a><span class="d_buy f_l">已售：{$ditem.buy_count}张</span>{if $ditem.max_bought gt 0}<span class="d_buy f_l">还剩：{$ditem.can_count}张</span>{else}<span class="d_buy f_l">不限制购买数量</span>{/if}</div>
			<div class="xj_brief">{function name="msubstr" v=$ditem.brief b=0 e=80}</div>
		</div>
	</div>
	{if !$smarty.foreach.ditem.last}
	<i class="aj_border"></i>
	{/if}	
	{/foreach}
</div>
{/if}
{if $type eq "e"}
<div class="aj_content">
	{foreach from=$list key=key item=ditem name=ditem}
	<div class="aj_item clearfix">
		<a href="{$ditem.url}" title="{$ditem.name}" class="f_l" target="_blank"><img src="{function name="get_spec_image" v=$ditem.image w=142 h=116 g=1}"  alt="{$ditem.name}"/></a>
		<div class="aj_inner f_l">
			<a href="{$ditem.url}" class="aj_name" title="{$ditem.name}" target="_blank">{function name="msubstr" v=$ditem.name b=0 e=40}</a>
			<p class="p_lh">简价：<span>{function name="msubstr" v="$ditem.brief" a=0 b=40}</span></p>
			<p class="p_lh">
				{$LANG.EVENT_TIME}：
				{if $ditem.event_begin_time eq 0}
				{else}
				{function name="to_date" v=$ditem.event_begin_time f="Y-m-d"} 
				{/if}	
					
				{if $ditem.event_end_time eq 0}
				{$LANG.NO_END_TIME}
				{else}
				{$LANG.TO} {function name="to_date" v=$ditem.event_end_time f="Y-m-d"}
				{/if}
			</p>
			<div class="clearfix" style="margin-top:13px;"><a class="aj_button f_l" href="{$ditem.url}" target="_blank"></a><span class="d_buy f_l">{$ditem.submit_count}人已报名</span></div>
		</div>
	</div>
	{if !$smarty.foreach.ditem.last}
	<i class="aj_border"></i>
	{/if}	
	{/foreach}
</div>
{/if}

<div class="blank"></div>
<div class="pages" id="data_page">{$pages}</div>
{/if}